package com.geekbang;

import java.util.Objects;

public class ExceptionAndError {

	public static void main(String[] args) {
		String NullStr = null;
		String stra  = "";
		// 对象为空, 抛出空指针异常
		try {
			Objects.requireNonNull(NullStr);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}
